import { config ,baseApiUrl} from '../../config/cfg';
import { getRequest, postRequest} from '../../utils/request';
const { delay } = require('../../utils/delay');
const app = getApp();

function mockGetBanners() {
   return delay().then(()=>{
     return ['../../images/lb1.png','../../images/lb2.png','../../images/lb3.png'];
   });
}

function realGetBanners() {
  var params = {url:app.get_request_url("indexNew", "index"),data:{}};
  console.log(app.get_request_url("indexNew", "index"));
  return getRequest(params);
}

export const getBanners=()=> {
  // if (config.useMock) {
  //   return mockGetBanners();
  // }else{
    return realGetBanners();
  // }
}
